# awk script to convert a database apscatter file to a table:
# center, width, height 
# used by the gaussian fit program

BEGIN {
FALSE = 1
TRUE = 0 
all = FALSE
}

{
if ( match($0,"low	") ) {
   low = $3
   all = FALSE
   }
else if ( match($0,"center	") ) {
   center = $3
   all = FALSE
   }
else if ( match($0,"high	") ) {
   high = $3
   all = TRUE
   }

if ( all == TRUE ) {
   print center-1.0,(high-low)/2.335/2.335,25000.0 # note that center-1.0 (iraf
                                             # counts from 1.  we from 0
   all = FALSE
   }
}

